<?php
/**
 * Created by PhpStorm.
 * User: linux
 * Date: 12/01/2018
 * Time: 1:21 PM
 */

namespace Criteria\Criteria;


class CriteriaSingle implements Criteria
{
    function meetCriteria(array $persons) : array
    {
        $singlePersons = [];
        foreach ($persons as $person) {
            if ($person->getMaritalStatus() == 'SINGLE') {
                $singlePersons[] = $person;
            }
        }
        return $singlePersons;
    }
}